/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * @author ori
 */
@Embeddable
public class CluePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "levelNo")
    private int levelNo;
    @Basic(optional = false)
    @Column(name = "clueNo")
    private int clueNo;

    public CluePK() {
    }

    public CluePK(int levelNo, int clueNo) {
        this.levelNo = levelNo;
        this.clueNo = clueNo;
    }

    public int getLevelNo() {
        return levelNo;
    }

    public void setLevelNo(int levelNo) {
        this.levelNo = levelNo;
    }

    public int getClueNo() {
        return clueNo;
    }

    public void setClueNo(int clueNo) {
        this.clueNo = clueNo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) levelNo;
        hash += (int) clueNo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CluePK)) {
            return false;
        }
        CluePK other = (CluePK) object;
        if (this.levelNo != other.levelNo) {
            return false;
        }
        if (this.clueNo != other.clueNo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.CluePK[levelNo=" + levelNo + ", clueNo=" + clueNo + "]";
    }

}
